import requestApi from "src/erm/sscrppublic/common/components/requestApi";

import {ajax, toast } from 'nc-lightapp-front';


let requestDomain =  '';

let requestApiOverwrite = {
    ...requestApi,
    //单据模板接口
    tpl: (opt) => {
        ajax({
            url: opt.url || `${requestDomain}/nccloud/erm/expenseaccount/HKPullTempletAction.do`,
            data: opt.data,
            success: opt.success
        });
    },
    query:(opt) => {
         ajax({
            url: `${requestDomain}/nccloud/erm/expenseaccount/ExpenseaccountQueryJKBillAction.do`,
            data: opt.data,
            success: (data) => {
                if (data && data.data && data.data.length > 0) {
                    data = data.data;
                    opt.success(data);
                } else {
                    // toast({content: '无数据', color: 'warning'})
                    opt.success(null);
                }
            }
        })
        //opt.success(searchMockData.data)
    }
}

export default  requestApiOverwrite;
